using System.Collections.Generic;

namespace AvaAI批量点评系统.Models
{
    /// <summary>
    /// 能力评价项目
    /// </summary>
    public class AbilityEvaluationItem
    {
        public string Category { get; set; } = string.Empty;  // 大类别，如"1.表达能力"
        public string SubCategory { get; set; } = string.Empty;  // 子类别，如"表达流畅性"
        public string LevelAMinus { get; set; } = string.Empty;  // A-等级评语
        public string LevelA { get; set; } = string.Empty;      // A等级评语
        public string LevelAPlus { get; set; } = string.Empty;  // A+等级评语
        public string SelectedLevel { get; set; } = "A";        // 当前选择的等级
    }

    /// <summary>
    /// 学生能力评价数据
    /// </summary>
    public class StudentAbilityEvaluation
    {
        public string StudentName { get; set; } = string.Empty;
        public List<AbilityEvaluationItem> EvaluationItems { get; set; } = new();

        public StudentAbilityEvaluation()
        {
            InitializeDefaultEvaluations();
        }

        /// <summary>
        /// 初始化默认的能力评价项目
        /// </summary>
        private void InitializeDefaultEvaluations()
        {
            EvaluationItems = new List<AbilityEvaluationItem>
            {
                // 1.表达能力
                new AbilityEvaluationItem
                {
                    Category = "1.表达能力",
                    SubCategory = "表达流畅性",
                    LevelAMinus = "表达不够流畅，语言组织能力较弱",
                    LevelA = "表达基本流畅，语言组织能力一般",
                    LevelAPlus = "表达非常流畅，语言组织能力强",
                    SelectedLevel = "A"
                },
                new AbilityEvaluationItem
                {
                    Category = "1.表达能力",
                    SubCategory = "对象准确性",
                    LevelAMinus = "表达对象不够准确，容易产生歧义",
                    LevelA = "表达对象基本准确，偶尔有不清楚的地方",
                    LevelAPlus = "表达对象非常准确，清晰明了",
                    SelectedLevel = "A+"
                },
                new AbilityEvaluationItem
                {
                    Category = "1.表达能力",
                    SubCategory = "音量大小",
                    LevelAMinus = "音量过小或过大，影响表达效果",
                    LevelA = "音量适中，基本不影响表达",
                    LevelAPlus = "音量控制得当，表达效果好",
                    SelectedLevel = "A"
                },
                new AbilityEvaluationItem
                {
                    Category = "1.表达能力",
                    SubCategory = "逻辑性",
                    LevelAMinus = "表达逻辑性较差，思路不够清晰",
                    LevelA = "表达逻辑性一般，思路基本清晰",
                    LevelAPlus = "表达逻辑性强，思路非常清晰",
                    SelectedLevel = "A+"
                },
                new AbilityEvaluationItem
                {
                    Category = "1.表达能力",
                    SubCategory = "积极性",
                    LevelAMinus = "表达积极性不高，较少主动发言",
                    LevelA = "表达积极性一般，偶尔主动发言",
                    LevelAPlus = "表达积极性很高，经常主动发言",
                    SelectedLevel = "A-"
                },

                // 2.课堂参与度
                new AbilityEvaluationItem
                {
                    Category = "2.课堂参与度",
                    SubCategory = "作品创作",
                    LevelAMinus = "没有对作品进行创作",
                    LevelA = "较少对作品进行创作",
                    LevelAPlus = "经常对作品进行创作完善",
                    SelectedLevel = "A"
                },
                new AbilityEvaluationItem
                {
                    Category = "2.课堂参与度",
                    SubCategory = "课堂专注度",
                    LevelAMinus = "在老师授课时不专心上课，一直想着不太专心或者不专心",
                    LevelA = "在老师授课时能够专心上课，但偶尔会走神",
                    LevelAPlus = "在老师授课时能够专心上课，对老师讲解的内容，并且积极回答老师问题",
                    SelectedLevel = "A+"
                },

                // 3.课堂专注度
                new AbilityEvaluationItem
                {
                    Category = "3.课堂专注度",
                    SubCategory = "课堂专注度",
                    LevelAMinus = "对问题分析和解决表现不佳，解决问题的能力较弱",
                    LevelA = "对问题理解基本较好，对问题分析和解决能力一般",
                    LevelAPlus = "对问题理解深入，可以较好地分析问题，并能够较好地解决问题",
                    SelectedLevel = "A+"
                },

                // 4.问题解决能力
                new AbilityEvaluationItem
                {
                    Category = "4.问题解决能力",
                    SubCategory = "解决问题能力",
                    LevelAMinus = "解决问题能力较弱，需要老师或同学的帮助",
                    LevelA = "基本可以独立解决问题能力，但需要一定的指导",
                    LevelAPlus = "可以独立解决问题，并主动不断解决方案",
                    SelectedLevel = "A+"
                },

                // 5.动手能力
                new AbilityEvaluationItem
                {
                    Category = "5.动手能力",
                    SubCategory = "动手能力",
                    LevelAMinus = "动手能力较弱，较少参与动手活动",
                    LevelA = "可以完成三基本动手活动，但需要一定的指导，高要求不太能够胜任",
                    LevelAPlus = "动手能力强，主动参与各种动手活动，基本不需要帮助",
                    SelectedLevel = "A+"
                },

                // 6.合作能力
                new AbilityEvaluationItem
                {
                    Category = "6.合作能力",
                    SubCategory = "合作能力",
                    LevelAMinus = "不愿意与他人合作，团队合作能力较差",
                    LevelA = "愿意与他人合作，合作能力一般，团队合作能力一般，团队合作能力较弱",
                    LevelAPlus = "非常愿意与他人合作，合作能力强，团队合作能力强，团队合作能力较强",
                    SelectedLevel = "A"
                },

                // 7.知识接受度
                new AbilityEvaluationItem
                {
                    Category = "7.知识接受度",
                    SubCategory = "知识接受度",
                    LevelAMinus = "接受新知识的速度较慢，理解能力较弱，并且较难应用到实际",
                    LevelA = "接受知识的速度一般，理解能力一般，并且能够基本应用到实际",
                    LevelAPlus = "接受新知识的速度较快，理解能力强，并且能够灵活应用到实际",
                    SelectedLevel = "A+"
                },

                // 8.逻辑思维
                new AbilityEvaluationItem
                {
                    Category = "8.逻辑思维",
                    SubCategory = "逻辑思维",
                    LevelAMinus = "有逻辑思维能力，但逻辑思维能力较弱",
                    LevelA = "有逻辑思维能力，逻辑思维能力一般，但逻辑思维能力较弱",
                    LevelAPlus = "有逻辑思维能力，逻辑思维能力强，并且逻辑思维能力较强",
                    SelectedLevel = "A+"
                }
            };
        }

        /// <summary>
        /// 获取当前选择等级对应的评语
        /// </summary>
        public string GetSelectedComment(AbilityEvaluationItem item)
        {
            return item.SelectedLevel switch
            {
                "A-" => item.LevelAMinus,
                "A" => item.LevelA,
                "A+" => item.LevelAPlus,
                _ => item.LevelA
            };
        }
    }
}
